package com.h6.crm.entity;

import java.io.Serializable;
import java.util.Date;

import org.springframework.format.annotation.DateTimeFormat;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

@Schema(description = "附件实体")
@Data
@TableName("SO_CrmAttachment")
public class Attachment implements Serializable {

    @Schema(description = "附件ID")
    @TableId(value = "Id", type = IdType.AUTO)
    Long id;

    @Schema(description = "附件名")
    @TableField("FileName")
    String fileName;

    @Schema(description = "附件路径")
    @TableField("FilePath")
    String filePath;

    @TableField("EntityId")
    Long EntityId;

    @TableField("FileType")
    Integer fileType;

    @Schema(description = "备注")
    @TableField("Remark")
    String remark;

    @Schema(description = "附加上传时间")
    @TableField(value = "CreateTime", fill = FieldFill.INSERT_UPDATE)
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "Asia/Shanghai")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    Date createTime;

}
